//=============================================================================
// TF Warhead Structure
//============================================================================= 
class TFWarhead extends TFStation
	placeable;

simulated function SetInitialTeam(int t)
{
    local controller c;

    super.setinitialteam(t);

    for ( c = Level.ControllerList; c!=None; c=c.nextController )
    {
        if(playercontroller(c)!=none && c.PlayerReplicationInfo.team.TeamIndex!=t)
            playercontroller(c).ReceiveLocalizedMessage(class'TaskForces.TFSWWarnMsg');
    }
}

state Ready
{
    function BeginState()
    {
        super.BeginState();

        if(myteam==0) setstaticmesh(StaticMesh'TFMedia.Buildings.tfWarheadRed');
        else setstaticmesh(StaticMesh'TFMedia.Buildings.tfWarheadBlu');
    }

    function Timer()
    {
    }
}

function Destructed(pawn killer, bool recycled)
{
    local controller c;

    if(!recycled || killer!=none)
    {
        for ( c = Level.ControllerList; c!=None; c=c.nextController )
        {
            if(playercontroller(c)!=none && c.PlayerReplicationInfo.team.teamindex!=myteam)
            playercontroller(c).ReceiveLocalizedMessage(class'TaskForces.TFSWUnWarnMsg');
        }
    }

    super.Destructed(killer, recycled);
}

defaultproperties
{
     MaxHealth=500.000000
     BuildTime=180.000000
     chunkcount=5
     BuildingName="Warhead"
     NameIndex=7
     StaticMesh=StaticMesh'TFMedia.Buildings.tfWarhead'
     AmbientSound=Sound'TFMedia.Buildings.tfWarheadAmb'
}
